package 模板;

import java.util.Arrays;
import java.util.Random;

public class Tools {
    public int getRandomNum(int min, int max) {
        return new Random().nextInt(max) % (max - (min - 1)) + min;
    }

    public void print2DArray(int[][] a) {
        for (int i = 0; i < a.length - 1; i++) {
            System.out.println(Arrays.toString(a[i]).replaceAll("[^0-9]+", " ").trim());
        }
        System.out.println(Arrays.toString(a[a.length - 1]).replaceAll("[\\[\\],]+", ""));
    }

}
